/*
 * @Author: HZK
 * @Date: 2020-09-08 13:53:40
 * @LastEditTime: 2020-09-16 10:35:12
 * @LastEditors: hanfengmi
 * @Description: 首页展示
 */
import React, { PureComponent } from 'react'
import styles from './index.less'
import router from 'umi/router'
import { connect } from 'dva'
 
@connect(({ home }) => ({
  home
}))

class Index extends PureComponent {
  state = {
    canClick: true
  }
  componentDidMount() {
    const { dispatch } = this.props
    dispatch({
      type: 'home/GetName',
      payload: {
        name: '爱吃'
      }
    })
  }
  render() {
    const { home: { name } } = this.props
    return (
      <div className={`${styles.ContentInner}`}>
        <div className={`${styles.PartBanner}`} onClick={()=>router.push('/title')}>{ name }</div>
        <div className={`${styles.PartContent}`}>
          阿萨大
        </div>
        
      </div>
    )
  }
}

export default Index